
IF ((NOT DAS_PUGIXML_INCLUDED) AND ((NOT ${DAS_PUGIXML_DISABLED}) OR (NOT DEFINED DAS_PUGIXML_DISABLED)))
    SET(DAS_PUGIXML_INCLUDED TRUE)
    MESSAGE(STATUS "dasPUGIXML module included.")

	SET(DAS_PUGIXML_DIR ${PROJECT_SOURCE_DIR}/modules/dasPUGIXML)
	SET(PUGIXML_INCLUDE_DIR ${DAS_PUGIXML_DIR}/pugixml)

    LIST(APPEND CMAKE_MODULE_PATH ${DAS_PUGIXML_DIR})

	# libDasModulePUGIXML
	SET(DAS_PUGIXML_MODULE_SRC
		${DAS_PUGIXML_DIR}/src/dasPUGIXML.h
		${DAS_PUGIXML_DIR}/src/dasPUGIXML.cpp
	)

	# pugixml
	SET(PUGIXML_SRC
		${DAS_PUGIXML_DIR}/pugixml/pugixml.cpp
		${DAS_PUGIXML_DIR}/pugixml/pugixml.hpp
		${DAS_PUGIXML_DIR}/pugixml/pugiconfig.hpp
	)

	ADD_MODULE_CPP(PUGIXML)
	# ADD_MODULE_NATIVE(PUGIXML_boost)
	ADD_MODULE_LIB(libDasModulePUGIXML ${DAS_PUGIXML_MODULE_SRC} ${PUGIXML_SRC})
	TARGET_LINK_LIBRARIES(libDasModulePUGIXML ${PUGIXML_LIBRARIES})
	# ADD_DEPENDENCIES(libDasModulePUGIXML)
	TARGET_INCLUDE_DIRECTORIES(libDasModulePUGIXML PUBLIC ${PUGIXML_INCLUDE_DIR})
	SETUP_CPP11(libDasModulePUGIXML)
ENDIF()
